import React from "react";
import { Outlet, useNavigate } from "react-router-dom";
import { Tabbar } from "react-vant";
import { houserouters } from "../../router";
function Index() {
  let nav = useNavigate();
  return (
    <div>
      <Outlet></Outlet>
      <Tabbar onChange={(key) => nav(key)}>
        {houserouters.map((item, index) => (
          <Tabbar.Item icon={item.icon} key={index} name={item.path}>
            {item.title}
          </Tabbar.Item>
        ))}
      </Tabbar>
    </div>
  );
}

export default Index;
